﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Projet1VideoAulaNery
{
    public partial class WebFormPanel : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Label label2 = new Label();
            label2.Text = "Label Panel2";
            TextBox tbNome = new TextBox();
            Button btSalvar = new Button();
            btSalvar.Text = "Salvar";
            Panel2.Controls.Add(label2);
            Panel2.Controls.Add(tbNome);
            Panel2.Controls.Add(btSalvar);
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            Panel1.Visible = true;
            Panel2.Visible = false;
        }

        protected void Button3_Click(object sender, EventArgs e)
        {
            Panel1.Visible = false;
            Panel2.Visible = true;
        }
    }
}